export function useConfig() {
  const queryParams = ref<Recordable>({
    username_keyword: '',
  })
  const tableColumns = computed(() =>
    buildColumns([
      {
        dataIndex: 'username',
        title: '账号',
        minWidth: 140,
        slotName: 'username',
      },
      {
        dataIndex: 'google_secret',
        title: '谷歌密钥',
        minWidth: 180,
        format: 'copy',
      },
      {
        dataIndex: 'login_at',
        title: '最近登录时间',
        minWidth: 180,
        sortable: sortableSettings,
        format: 'date-time',
      },
      {
        dataIndex: 'login_ip',
        title: '登录IP',
        minWidth: 120,
        format: 'copy',
      },
      {
        dataIndex: 'login_addr',
        title: 'IP所在地',
        minWidth: 180,
      },
      {
        dataIndex: 'created_at',
        title: '创建时间',
        minWidth: 180,
        sortable: sortableSettings,
        format: 'date-time',
      },
      {
        dataIndex: 'status',
        title: '状态',
        width: 90,
        slotName: 'status',
      },
      {
        dataIndex: 'actions',
        title: '操作',
        width: 90,
        slotName: 'actions',
        cellClass: 'actions-cell',
      },
    ]),
  )

  return { queryParams, tableColumns }
}
